package mop.exception;

/**
 * Exception class for incorrect names
 * 
 * @author	 MOP Team 7
 */
public class IllegalIdException extends Throwable 
{

	/**
	 * Initializes an IllegalIdException with the passed id
	 * 
	 * @param id	The id thats incorrect
	 *  
	 * @post	Set the id
	 */
	public IllegalIdException(String id)
	{
		this.id = id;
	}
	
	/**
	 * Return a error message that can be used by the gui
	 * @return An error message describing the incorrect id
	 */
	public String toString()
	{
		return "Incorrect id given: "+id;
	}
	
	/**
	 * Weird java demand
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * The id thats causing the problem
	 */
	private final String id;
	
}
